package com.eagle.fulltextnews;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.eagle.gennewdata.untl.GloblasFun;

public class GenDataTaskServlet extends HttpServlet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		int nPage = 1;
		
		resp.setContentType("application/octet-stream;charset=utf-8");
		resp.setHeader("Pragma", "No-cache");
		resp.setHeader("Cache-Control", "no-cache");
		resp.setDateHeader("Expires", 0);
		
		if (req.getParameter("page") != null)
			nPage = Integer.valueOf(req.getParameter("page").toString());
		GloblasFun.getCacheRssItem(nPage, resp);
	}
}